import os
pipe = os.popen('sleep 5')
pipe.close()

pipe = os.popen('python test.py')
file_dir = pipe.read()

print file_dir, type(file_dir)

pipe.close()
